"""定义一些“常量”"""

KEY = 'key'
USER = 'user'
VALUE = 'value'

MONGODB_NAME = 'gradio_chatbot'

IO_PREFIX = {
    'i': '输入',
    'o': '输出',
}

RATE = 16000

RESULT_PREFIX = '目前的诊断是：（列举各种可能）'
PROMPT_MED = '（诊断结果仅供参考，请咨询专业医师。）'
GENERATING = '（内容生成中……）'

CHAT_ONLY = '纯聊天'
CHAT_AND_DIAG = '聊天+诊断'
CHAT_MODES = set([CHAT_ONLY, CHAT_AND_DIAG, ])
CHAT_MODE_NEW_DICT = {
    CHAT_ONLY: CHAT_AND_DIAG,
    CHAT_AND_DIAG: CHAT_ONLY,
}
CHAT_PROMPT_TPL = '当前是“{}”模式，输入两个句号（..或。。）切换成“{}”模式'
CHAT_PROMPT_DICT = {
    CHAT_ONLY: CHAT_PROMPT_TPL.format(CHAT_ONLY, CHAT_AND_DIAG, ),
    CHAT_AND_DIAG: CHAT_PROMPT_TPL.format(CHAT_AND_DIAG, CHAT_ONLY, ),
}
SWITCH_DONE_TPL = '已切换到“{}”模式。'
SWITCH_DONE_DICT = {
    CHAT_ONLY: SWITCH_DONE_TPL.format(CHAT_AND_DIAG, ),
    CHAT_AND_DIAG: SWITCH_DONE_TPL.format(CHAT_ONLY, ),
}

SWITCH_COMMAND_SET = set(['..', '。。', '.。', '。.'])
